package com.chencai.wiki.database.googleapp;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;


@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class TableRevision 
{
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;
        
	@Persistent
	private Integer pageId;
	

	@Persistent
	private Integer revisionId;
	
	@Persistent
	private String author;
	
    @Persistent
    private Date updateDate;
    
    @Persistent
    private String diffContent;
    
    public TableRevision(int pageId, int revisionId, String author, Date updateDate, String diffCountent)
    {
    	this.pageId = new Integer(pageId);
    	this.revisionId = new Integer(revisionId);
    	this.author = author;
    	this.updateDate = updateDate;
    	this.diffContent = diffContent;
    }
    
    public int getPageId()
    {
    	return this.pageId.intValue();
    }
    
    public void setPageId(int id)
    {
    	this.pageId = id;
    }
    
    public int getRevisionId()
    {
    	return this.revisionId.intValue();
    }
    
    public void setRevisionId(int id)
    {
    	this.revisionId = id;
    }
    
    public String getAuthor()
    {
    	return this.author;
    }
    
    public void setAuthor(String author)
    {
    	this.author = author;
    }
    
    public Date getUpdateDate()
    {
    	return this.updateDate;
    }
    
    public void setUpdateDate(Date date)
    {
    	this.updateDate = date;
    }
    
    public String getDiffContent()
    {
    	return this.diffContent;
    }
    
    public void setDiffContent(String content)
    {
    	this.diffContent = content;
    }
    
    
	
	
}
